Jump To:
Technical Q&As
Carbon is a set of APIs that enables C and C++ developers to take advantage of Mac OS X-specific features, including an advanced user interface tool kit, an efficient event-handling mechanism, the Quartz 2D graphics library, and multiprocessing support. In addition, other industry-standard C and C++ APIs are easily available to Carbon developers, providing access to such services as the OpenGL drawing system, the Mach microkernel, and BSD operating-system services. Because Carbon is a collection of C programming interfaces, developers can use virtually any Macintosh C development environment that supports PowerPC to build Carbon applications.

Carbon Resources
A guided introduction and learning path for developers new to Carbon.   Essential information for developers using procedural C.   Descriptions of procedural C programming interface elements.
Document Descriptions
On Off
Display

Sorted by
Title
Sort by
Topic
Sort by
Date
How PBDTGetAPPL Chooses Which Copy of an App to Launch (HTML) ()
Deprecated - TB19: Explains how PBDTGetAppl() chooses which application copy to launch, and how to deal with the trash.
Human Interface Toolbox 1996-05-14
How to define a plst resource in a .r file (HTML)
QA1034: Describes how to include a .plist file in a .r file.
Process Management, Runtime Architecture 2001-05-09
How to measure CG text (HTML)
QA1051: Explains how to measure Core Graphics text.
Graphics & Imaging, Printing 2001-07-02
How to use the OT modem script engine (HTML) ()
Deprecated - NW50: Shows how to use the Open Transport modem script engine.
Networking 1997-07-11
How to use URL Access with proxy servers (HTML)
Deprecated - QA1074: Explains how to use URL Access with proxy servers.
Networking 2001-10-02
ICLaunchURL, "file:///" URLs and Mac OS X (HTML)
QA1028: Describes problems with ICLaunchURL and "file:///" URLs on Mac OS X.
Process Management 2001-04-20
Improving ATSUI Text Drawing Performance (HTML)
QA1027: Talks about one way of improving ATSUI text drawing performance.
Graphics & Imaging, Text & Fonts, Typography 2001-04-17
Incorrect Inside Macintosh Volume V documentation (HTML)
Deprecated - QD15: Identifies incorrect documentation in Inside Macintosh Volume V regarding the formats of PnPixPat and BkPixPat opcodes.
Games, Graphics & Imaging, QuickTime 1995-09-15
The Initialize Method of Multi-fragment Contextual Menu Plug-ins (HTML) ()
TB60: Explains how to deal with multiple Contextual Menu plug-ins code fragments.
Human Interface Toolbox 1999-04-05
Installing input methods on Mac OS X (HTML)
QA1054: Describes how to install and use input methods on Mac OS X.
Human Interface Toolbox, Interapplication Communication, Text & Fonts 2001-09-14
The intermittent behavior of SetDialogItemText (HTML)
Deprecated - QA1082: Explains why SetDialogItemText may seem to not work correctly if you have embedding turned on.
Human Interface Toolbox 2001-10-30
Internet Connect Speed (HTML) ()
QA1165: Describes how to get the modem connection speed from the System Configuration framework dynamic store.
Core Foundation 2003-03-26
Is ColorSync thread safe? (HTML) ()
QA1261: Discusses ColorSync thread-safety issues.
Graphics & Imaging 2003-04-17
Is QuickTime thread-safe? (HTML)
QA1088: Discusses thread-safety and reentrancy of the QuickTime library on both Mac & Windows.
Design Guidelines, Process Management 2001-11-01
IsCmdChar (HTML) ()
TX12: Describes the routine IsCmdChar, which is useful when testing for Command-period and command-AnyCharacter.
Text & Fonts 1998-07-06
Loading Scripting Additions without initializing AppleScript in Mac OS X (HTML)
QA1070: Explains how to load scripting additions so you can call them using Apple events.
AppleScript 2001-09-13
Locating a Font's Home File (HTML) ()
Deprecated - TB18: Lists the steps necessary to find the home file of a given font.
Text & Fonts 1996-02-15
Locking an Area Using PBLockRange (HTML) ()
OPS09: Describes the behavior of PBLockRange.
File Management 1996-05-14
LockPixels and DisposeGWorld with QTNewGWorldFromPtr (HTML)
QA1007: Clarifies some issues surrounding pointer ownership when creating GWorlds with QTNewGWorldFromPtr
QuickTime 2001-02-26
MACE Restrictions (HTML) ()
Deprecated - SND16: MACE algorithms only support the compression of 8-bit offset binary sound.
Music & Audio 1999-06-08
Making Input Gain Setting Changes (HTML) ()
Deprecated - SND01: Changing the input gain setting on older Power Macs before recording.
Music & Audio 1996-06-01
Managing custom drawing code in a compositing world (HTML)
QA1162: Explains why any custom drawing code must be handled by the kEventControlDraw handler of a custom HIView
Human Interface Toolbox 2004-10-14
Menus & Hardware Accelerated OpenGL under Mac OS 9 Carbon (HTML)
QA1042: Explains how to handle correctly Mac OS 9 menus when there is hardware accelerated OpenGL blitting.
Human Interface Toolbox 2001-07-10
Movies - Saving movie playback hints (HTML)
QA1366: Explains how to save and load media play hints from Movie files.
QuickTime 2004-09-14
Moving the Menu Bar (HTML) ()
Deprecated - TB54: Describes how to move the menubar to another Macintosh Display and why this move is unadvisable.
Human Interface Toolbox, User Experience 1998-12-22
MPRemoteCall Contexts (HTML) ()
QA1122: Describes two recently introduced options for the context parameter of MPRemoteCall.
Process Management 2002-02-18
Multiple Resources with the Same Type and ID (HTML) ()
TB30: Explains why Resource IDs should be unique within a given resource type within a given resource file.
Human Interface Toolbox 1996-11-27
My custom item dismisses my Navigation Services dialog (HTML)
QA1381: Gives a workaround for dismissive clicks on items in the custom area of Navigation Services dialogs.
File Management, Human Interface Toolbox, User Experience 2004-11-22
My ListBox control works fine on Mac OS X but I get a crash on Mac OS 9 when I click in the scrollbar (HTML) ()
QA1156: Explains the requirements for the use of the Listbox Control on Mac OS 9 and Mac OS X.
Human Interface Toolbox 2002-07-12
Non Mac OS X Bundled data-fork based Resources (HTML) ()
QA1098: Mac OS X Bundled data-fork based Resources
Data Management, Design Guidelines, File Management, Process Management, Resource Management, Runtime Architecture 2003-08-20
Notifying the Finder of changed or newly created files (HTML) ()
QA1260: Recommended approach to notifying the Finder to update its open windows of a file creation or change.
File Management, Human Interface Toolbox, Interapplication Communication 2003-04-15
NSL and how it relates to Rendezvous (HTML)
QA1299: Explains the relationship between NSL and Rendezvous.
Networking 2003-09-18
Numerous Small Packet Exchanges Resultin Poor TCP Performance (HTML) ()
NW26: Explains why numerous small package exchanges result in poor TCP performance.
Networking 1998-05-25
Open File Limits on Mac OS X (HTML) ()
QA1005: Explains how many files an application can open simultaneously in Mac OS X.
Process Management 2001-02-08
Open Transport Error -3208: kEBADFErr (HTML) ()
NW21: Explains why a call to OTSnd may result in a kEBADFErr -3208.
Networking 1996-03-04
Open Transport Errors -3151/-3160 and Option Management (HTML) ()
NW54: Gives possible causes of errors -3151 and -3160 when making an OptionManagement call to set an endpoint.
Networking 1998-04-12
Open Transport Libraries (HTML) ()
NW18: Lists the Open Transport libraries and what to link with for PowerPC and 68K.
Networking 2000-11-03
Open Transport Versions (HTML)
NW64: Lists the current versions of Open Transport and their features.
Networking 2000-05-08
OpenGL Sample Code (HTML)
QA1166: Describes new naming convention for OpenGL sample code
Games, Graphics & Imaging 2004-12-01
OpenGL Texture Sharing Between Contexts (HTML)
QA1031: Describes the process of creating shared OpenGL contexts and sharing textures between these contexts.
Games, Graphics & Imaging 2001-05-01
OTScheduleDeferredTask When Task Running (HTML) ()
NW52: Describes what happens when you use OTScheduleDefferedTask to schedule a task that is running.
Design Guidelines, Events & Other Input, Networking, Performance, Process Management, Resource Management, Runtime Architecture, Tools 1997-10-13
OTScheduleSystemTask Cleanup (HTML) ()
Deprecated - NW37: States the proper way to clean up any pending system tasks scheduled with OTScheduleSystemTask.
Networking 1996-07-03
Parsing the PICT File Format (HTML) ()
Deprecated - QD56: Explains where to find information on the PICT file format and warns against parsing a PICT file.
Graphics & Imaging 1998-02-10
PBLockRange with a zero-length range (HTML)
FL13: Describes the afpRangeOverlap error and a work around.
File Management 1999-11-22
Pop-up Menu CDEFs: The Real Story (HTML) ()
TB42: Explains why you should never allow the pop-up menu CDEFs to create a menu for you.
Human Interface Toolbox 1998-07-30
Power Management; Policy Maker vs. Power Controller (HTML) ()
QA1121: Describes the differences between a Power Management Policy Maker and a Power Management Power Controller.
Events & Other Input, Process Management 2002-02-13
PPPoE Server for Testing (HTML) ()
QA1252: Describes how to configure Mac OS X as a PPPoE server for testing purposes.
Networking 2003-04-11
Preserving embedded ICC profiles when using QuickTime Graphics Importer/Exporters (HTML) ()
QA1145: Shows how to preserve the embedded ICC profile when using the QuickTime Graphics Importer/Exporter routines
Graphics & Imaging 2002-09-04
Preventing sleep (HTML)
QA1160: Explains how your application can prevent the system from sleeping.
Resource Management 2004-10-22
Printer Queue vs. Printer Name (HTML)
QA1407: Explains the difference between a printer queue and a printer name.
Printing 2005-01-27
Private HITheme APIs in Mac OS X 10.2 should not be called (HTML)
QA1377: Explains why weak-linked API common runtime check is not good enough for the HITheme APIs.
Human Interface Toolbox 2004-10-27
Problem Getting PICTS to Display in Correct Colors (HTML)
Deprecated - QD24: Using a custom color table to get PICTs to display with the right colors in an offscreen GWorld.
Graphics & Imaging 1995-09-15
Problem with PaintRgn on 256-color Screens (HTML)
Deprecated - QD23: PaintRgn with RGBForeColor and transfer mode addOver doesn't return color to original on 256-color-screens.
Graphics & Imaging, Performance, User Experience 1995-09-15
Problems Creating a Mask for a Picture (HTML)
Deprecated - QD27: Demonstrates creating a mask where the mask is 0 for pure white pixels and 1 everywhere else.
Graphics & Imaging 1995-09-15
Problems recording CopyBits into a PICT on Mac OS X 10.2 (HTML) ()
QA1189: Identifies a problem with CopyBits and PICT on Mac OS X 10.2 and gives a simple workaround.
Graphics & Imaging, Porting 2002-11-19
Process Carbon Events Not Delivered in 10.2 (HTML) ()
QA1181: Work around for a bug in Mac OS X 10.2 that prevents the delivery of process Carbon events.
Events & Other Input, Human Interface Toolbox, Process Management 2002-08-27
Programmatically causing restart, shutdown and/or logout (HTML) ()
QA1134: Describes how to programmatically cause restart, shutdown, sleep or logout.
Events & Other Input, Process Management, Resource Management 2003-02-10
QDFlushPortBuffer (HTML) ()
QD65: Describes a possible solution for window update problems under Carbon.
Events & Other Input, Graphics & Imaging, Human Interface Toolbox, Porting 2000-11-08
QDSwapPort (HTML) ()
QA1128: Explains when to use QDSwapPort.
Graphics & Imaging, Porting 2002-11-06
Quartz 2D Interpolation (HTML) ()
QA1186: Explains how to control Quartz 2D's image interpolation.
Graphics & Imaging, Printing 2002-10-29
Quartz 2D Thread Safety (HTML) ()
QA1238: Explains the thread-safety issues for the Quartz 2D API.
Graphics & Imaging, Performance, Printing, Process Management 2003-02-25
QuickDraw Text Anti-Aliasing using Quartz 2D (HTML) ()
QA1193: Describes APIs added to Mac OS X to allow applications to draw QD text using CG anti-aliasing.
Graphics & Imaging, Porting 2002-10-29
QuickTime and Carbon Events (HTML)
QA1090: Discusses how to ensure smooth movie playback when using Carbon Events in an application.
Design Guidelines 2001-10-26
Raw IP and Open Transport 2.5.x (HTML)
Deprecated - NW63: Discusses Open Transport 2.5's change to the behavior of raw IP endpoints with IP_HDRINCL set.
Networking 1999-10-25
Receiving UDP Broadcasts (HTML) ()
Deprecated - NW53: Explains why UDP endpoints may never receive UDP broadcast messages.
Networking 1997-11-17
Recording Compressed Sounds (HTML) ()
Deprecated - SND14: Sound Manager and sound input driver compression options are limited to allow interrupt time recording.
Music & Audio 1998-04-12
Registering a Rendezvous service multiple times (HTML)
QA1311: Explains why registering the same Rendezvous service twice on the same machine doesn't cause a name conflict.
Networking 2003-10-23
Registering for sleep notifications (HTML)
QA1340: Explains how register for sleep notifcations on Mac OS X.
Resource Management 2004-10-25
Rendezvous and wake from sleep (HTML)
QA1290: Explains why applications that use Rendezvous should stay registered and continue browsing on sleep.
Networking 2003-09-18
Rendezvous enforces the service type format in Panther (HTML)
QA1198: Explains why registering a Rendezvous service might fail on Panther.
Networking 2004-03-23
Rendezvous enforces the TXT record format in Panther (HTML)
QA1306: Explains how mDNSResponder enforces the proper TXT record format in Panther.
Networking 2004-07-14
The Rendezvous Name is not the Rendezvous name (HTML) ()
QA1228: Explains why you should use the Computer Name when advertising a Rendezvous service.
Networking 2004-03-05
Rendezvous TXT record rate limiting in Panther (HTML)
QA1293: Explains how mDNSResponder implements TXT record rate limiting in Panther.
Networking 2003-10-23
Replacing OpenPort in Carbon (HTML) ()
QD66: Discusses a potential crashing problem when Carbonizing code that uses black and white GrafPorts.
Graphics & Imaging, Porting 2000-11-08
Resolves may return an IPv6 address in Panther (HTML)
QA1298: Explains why you get an IP address of 0.0.0.0 when resolving a Rendezvous service.
Networking 2005-01-10
Resource forks in Mach-O binaries (HTML) ()
QA1175: Advises against using resource forks in Mach-O binaries.
Human Interface Toolbox, Resource Management, Runtime Architecture 2002-08-07
Retrieving Data from AEDesc Records - do not use the dataHandle field (HTML) ()
QA1139: Describes the correct way to access data stored in AEDesc records.
AppleScript, Interapplication Communication 2002-04-10
RunApplicationEventLoop and Thread Manager (HTML)
QA1061: Describes how to yield to cooperative (Thread Manager) threads from a RunApplicationEventLoop-based application.
Process Management 2001-10-10
Saving the current Core Graphics Path (HTML)
QA1056: Explains that the Core Graphics save and restore GState APIs do not affect the path.
Graphics & Imaging, Printing 2001-10-02
SCSIAction and IOSCSIUserClient on Mac OS X 10.2 (HTML) ()
QA1201: Describes migrating to a new API for SCSI Parallel devices starting with Mac OS X 10.2.
Printing 2002-09-13
Securely Erasing, Accessing and Dismounting a Macintosh Partition (HTML) ()
FL11: Set up a disk for secure erasures. Resources with information on magnetic disks, information recovery.
Data Management, Design Guidelines, File Management, User Experience 1999-01-11
Selecting a specific sound input source (HTML) ()
Deprecated - SND10: Using the sound input driver to select specific sound input sources.
Music & Audio 1998-01-16
Sending an Email (HTML)
QA1084: Shows how to create an email in the user's prefered email application.
Interapplication Communication, Internet & Web, Networking 2004-11-05
Sequence Grabber - Determining the capture resolution of an IIDC device (HTML)
QA1403: Discusses how to determine the resolution of a captured image from an IIDC device
QuickTime 2005-01-06
Server Endpoint 'qlen' Limit (HTML) ()
Deprecated - NW38: Tells how to determine the maximum 'qlen' value which limits the number of supported handoff endpoints.
Networking 1996-08-21
SetFontInfoForSelection incorrect prototype (HTML)
QA1375: Describes the incorrect prototyping of the SetFontInfoForSelection API and gives a workaround.
Events & Other Input, Human Interface Toolbox, Text & Fonts, User Experience 2004-10-04
Setting a Control's Variant Field (HTML) ()
Deprecated - TB63: Details how to change the variant of a custom control after creating the control.
Human Interface Toolbox 1999-05-03
Setting a UserPane's feature (HTML) ()
TB64: Explains how to set up the control attributes when creating controls, and UserPanes in particular.
Human Interface Toolbox 1999-09-27
Setting Audio Input Gain (HTML) ()
Deprecated - SND11: Setting audio input gain under Mac OS 8.1.
Music & Audio 1998-02-10
Setting environment variables for user processes (HTML)
QA1067: Tells how to set environment variables for user processes.
Data Management, Games, Interapplication Communication, Porting, Process Management, Resource Management, Runtime Architecture, Tools 2001-10-25
Setting request headers in URL Access (HTML) ()
Deprecated - QA1073: Explains how to work around a bug in URL Access when setting request headers.
Networking 2002-09-10
Setting the preferred CMM programatically? (HTML)
QA1086: Uses the NCMConcatProfileSet structure to specify the CMM to be used to make the CMWorldRef with the NCWConcatColorWorld function.
Graphics & Imaging 2001-10-24
siActive Channels Unsupported on Some Power Macs (HTML) ()
Deprecated - SND03: siActive Channels is unsupported on some older PowerMacs (siUnknownInfoType returned by SPBGetDeviceInfo).
Music & Audio 1996-06-01
Signals and Threads (HTML) ()
QA1184: Describes how threads and signals interact.
Process Management 2002-08-27
siMonitorSource Selector (HTML) ()
Deprecated - SND13: Using the sound output siMonitorAvailable, and siMonitorSource selectors.
Music & Audio 1998-04-12
siOSTypeInput Selectors (HTML) ()
Deprecated - SND12: The use of siOSTypeInputSource, and siOSTypeInputAvailable selectors and extracting the siOSTypeInputAvailable OSTypes returned.
Music & Audio 1998-04-12
siOSTypeInputAvailable Format (HTML) ()
Deprecated - SND09: The format of the data returned by the siOSTypeInputAvailable selector is SoundInfoList.
Music & Audio 1998-01-16
Sorting Like the Finder (HTML)
QA1159: Shows how to sort strings like the Finder's list view.
File Management, Text & Fonts 2004-10-27
Spooling in or out of CompressPicture or CompressImage (HTML)
Deprecated - QD17: Recommends alternatives to spooling the results of CompressPicture or CompressImage to or from disk.
Graphics & Imaging 1995-09-15
Static linking of user binaries on Mac OS X (HTML) ()
QA1118: Explains why static linking of user binaries is not supported on Mac OS X, and possible workarounds.
Runtime Architecture 2002-02-07